package com.media.system.service.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/**
 * 用户注册请求
 * 
 * @author Claude
 * @since 2024-01-20
 */
@Data
@Schema(description = "用户注册请求")
public class RegisterRequest {

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 2, max = 30, message = "用户名长度必须在2-30个字符之间")
    @Schema(description = "用户名", required = true, example = "zhangsan")
    private String username;

    /**
     * 昵称
     */
    @NotBlank(message = "昵称不能为空")
    @Size(min = 2, max = 30, message = "昵称长度必须在2-30个字符之间")
    @Schema(description = "昵称", required = true, example = "张三")
    private String nickname;

    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @Size(max = 50, message = "邮箱长度不能超过50个字符")
    @Schema(description = "邮箱", required = true, example = "zhangsan@example.com")
    private String email;

    /**
     * 手机号码
     */
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号码", example = "13800138000")
    private String phone;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20个字符之间")
    @Schema(description = "密码", required = true, example = "123456")
    private String password;

    /**
     * 确认密码
     */
    @NotBlank(message = "确认密码不能为空")
    @Schema(description = "确认密码", required = true, example = "123456")
    private String confirmPassword;

    /**
     * 验证码
     */
    @Schema(description = "验证码", example = "1234")
    private String code;

    /**
     * 唯一标识
     */
    @Schema(description = "验证码唯一标识", example = "uuid-123456")
    private String uuid;

    /**
     * 邀请码
     */
    @Schema(description = "邀请码", example = "INVITE123")
    private String inviteCode;
}